/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jims.master.modules.doctor.netHosptial.service;

import com.jims.master.common.service.CrudService;
import com.jims.master.modules.doctor.netHosptial.dao.NetTreatRecDao;
import com.jims.master.modules.doctor.netHosptial.entity.NetOrders;
import com.jims.master.modules.doctor.netHosptial.entity.NetTreatRec;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 检查治疗医嘱明细记录Service
 * @author qlx
 * @version 2016-09-10
 */
@Service
@Transactional(readOnly = true)
public class NetTreatRecService extends CrudService<NetTreatRecDao, NetTreatRec> {

    /**
     * 查询最大itemNo
     * @param-visitDate
     *  @param-visitNo
     * @version 2016-09-10
     */
    public String findMaxItemNo(NetTreatRec outpTreatRec){
        return dao.findMaxItemNo(outpTreatRec);
    }

    /**
     * 获得患者未传送的信息
     * @param-patientId
     * @param-visitDate
     * @param-visitNo
     * @return
     */
    public List<NetTreatRec> getInfoToSend(NetOrders hisOutpOrders){
        return dao.getInfoToSend(hisOutpOrders);
    };

    //删除检查检验相关的表
    @Transactional(readOnly = false)
    public void deleteFromAppointNo(NetTreatRec outpTreatRec){
        dao.deleteFromAppointNo(outpTreatRec);
    }
    /**
     * 由申请单取得相关的医嘱表、子表、门诊收费明细的关联信息serialNo
     * @param-appointNo
     * @return-visitDate
     * @return-visitNo
     * @return-serialNo
     */
    public NetTreatRec findInfoByAppointNo(NetTreatRec outpTreatRec){
        return dao.findInfoByAppointNo(outpTreatRec);
    }

    /**
     * 由clinicMaser取门诊收费明细的关联信息
     * @param-visitDate
     * @param-visitNo
     * @param-item_class = 'E'
     */
    public List<NetTreatRec> findOutpTreatRecByClinic(NetTreatRec outpTreatRec){
        return dao.findOutpTreatRecByClinic(outpTreatRec);
    }
}